package schoolWork.work03.text4;

public class MyRectangle implements IShape{
    private double width;
    private double height;

    public MyRectangle(double width, double height) {
        this.width = width;
        this.height = height;
    }


    @Override
    public double area() {
        return width*height;
    }

    @Override
    public double perimeter() {
        return 2*(width+height);
    }

    public String toString(){
        return "width="+width+", height="+height
                +", perimeter="+perimeter()+", area="+area();
    }
}
